<template>
  <div>
    <h2>学校名称: {{ name }}</h2>
    <h2>学校地址: {{ address }}</h2>
    <button @click="showName">点击显示学校名称</button>
  </div>
</template>

<script>
// 引入 mixin(局部混入)
import { mixin1, mixin2 } from "../mixin";
export default {
  name: "student-name",
  data() {
    return {
      name: "千锋",
      address: "北京昌平",
      x: 666,
      y: 888,
    };
  },
  mixins: [mixin1, mixin2],
  mounted() {
    console.log("School!!!!!");
  },
};
</script>
